﻿using System;
using System.Collections.Generic;

namespace Gmantis.Controls.DataGrid
{
    public enum DataGridFilterCombination
    {
        None,
        And,
        Or
    }

    public enum DataGridFilterOperation
    {
        Contains,
        Equal,
        GreaterThan,
        GreaterThanOrEqual,
        IsEmpty,
        IsNotEmpty,
        IsOneOf,
        LessThan,
        LessThanOrEqual,
        NotEqual,
        StartsWith,
        EndsWith,
        All,
        None,
        Some
    }

    public enum DataGridFilterType
    {
        CheckBox = 0,
        [Obsolete("Use MultiValue instead.", true)]
        ComboBox = 1,
        DateTime = 3,
        [Obsolete("This field is not longer used.", true)]
        Image = 4,
        MultiValue = 2,
        Numeric = 5,
        Other = 7,
        Text = 6
    }

    public class DataGridFilterInfo
    {
        public DataGridFilterCombination FilterCombination { get; set; }

        public DataGridFilterOperation FilterOperation { get; set; }

        public DataGridFilterType FilterType { get; set; }

        public object Value { get; set; }
    }

    public class DataGridFilterState
    {
        // Properties
        public List<DataGridFilterInfo> FilterInfo { get; set; }

        public object Tag { get; set; }
    }
}
